<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>All-Settled</title>
</head>

<body>
  <div>
    <textarea name="output" id="output" rows="10" cols="66"></textarea>
  </div>
</body>
<script>
  var elOutput = document.getElementById('output');
  var waitTime = 1000;
  var pro1 = () => new Promise((resolve) => {
    setTimeout(() => {
      resolve(waitTime)
    }, waitTime++)
  })
  waitTime += 1000;
  var pro2 = () => new Promise((resolve) => {
    setTimeout(() => {
      resolve(waitTime)
    }, waitTime++)
  })
  waitTime += 1000;
  var pro3 = () => new Promise((resolve) => {
    setTimeout(() => {
      resolve(waitTime)
    }, waitTime++)
  })
  waitTime += 1000;
  async function main() {
    var result = await Promise.allSettled([
      pro1(),
      pro2(),
      pro3()
    ])
    console.log(result);
    elOutput.textContent = JSON.stringify(result)
  }
  main()
</script>

</html>